﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewCart.ascx.cs" Inherits="usercontrol_ViewCart" %>

<div class="menu">
	<div class="hc1 hc1-header">
		<div class="hc1-adverb">
			<asp:Image ID="Image9" runat="server" ImageUrl="~/images/support.png" />
		</div>
		<div class="hc1-text">
			<asp:Label ID="lblTitle" runat="server" CssClass="text_header" Text="Giỏ hàng của bạn"></asp:Label>
		</div>		
	</div>
	<div class="viewcard">
		<div>
			<asp:GridView ID="GridVShoppingCart" runat="server" AutoGenerateColumns="False" EnableViewState="False"	GridLines="None" OnRowCommand="GridVShoppingCart_RowCommand" ShowFooter="True" Width="100%">
			<Columns>
			<asp:BoundField DataField="Index" HeaderText="STT" />
			<asp:BoundField DataField="ProductID" HeaderText="M&#227; sản phẩm" />
			<asp:TemplateField HeaderText="T&#234;n Sản Phẩm">
				<EditItemTemplate>
					<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ProductName") %>'></asp:TextBox>
				</EditItemTemplate>
				<ItemTemplate>
					&nbsp;<asp:HyperLink ID="hplProductName" runat="server" CssClass="mslink" NavigateUrl='<%# "~/Apps/productdetail.aspx?pid="+ DataBinder.Eval(Container.DataItem,"ProductID").ToString() %>'
						Text='<%# Eval("ProductName") %>'></asp:HyperLink>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:BoundField DataField="SalePrice" HeaderText="Gi&#225;" />
			<asp:TemplateField HeaderText="Số lượng">
				<EditItemTemplate>
					&nbsp;
				</EditItemTemplate>
				<ItemTemplate>
					<asp:TextBox ID="txtQuantity" runat="server" MaxLength="2" Text='<%# Eval("Quantity") %>'
						Width="24px"></asp:TextBox>&nbsp;
					<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtQuantity"
						ErrorMessage="Số>0" MaximumValue="99" MinimumValue="1" ValidationGroup="GridVShoppingCart"></asp:RangeValidator>
				</ItemTemplate>
			</asp:TemplateField>
			<asp:BoundField DataField="Amount" HeaderText="Th&#224;nh Tiền" />
			<asp:ButtonField ButtonType="Button" CommandName="Huy" HeaderText="Bỏ Ra"
				Text="Bỏ ra" />
		</Columns>
			<HeaderStyle CssClass="hc1" HorizontalAlign="Left" />
			<AlternatingRowStyle BackColor="LemonChiffon" />
			</asp:GridView>
		</div>
		<div class="clear"></div>		
		<div class="viewcard-totalprice">
			<div class="form-item">
				<div>
					<asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Tổng tiền:"></asp:Label>
				</div>
				<div style="float:left;padding-left: 5px;">
					<asp:Label ID="lblTotal" runat="server" CssClass="Warning" Text="0"></asp:Label>VNĐ
				</div>
			</div><br />
			<div class="form-item">
				<div>
					<asp:Label ID="Label2" runat="server" Font-Bold="True" Text="Chi phí:"></asp:Label>
				</div>
				<div>
					<asp:Label ID="lblShipment" runat="server" CssClass="Warning" Text="0"></asp:Label>&nbsp;VNĐ
				</div>
			</div>	
			<div class="form-item">
				<div>
				<span style="color: #ff6666">-----------------</span>
			</div>
				<div>
					<asp:Label ID="lblGTotal" runat="server" CssClass="Warning" Font-Bold="True" Text="0"></asp:Label>&nbsp;VNĐ
			</div>
			</div>	
		</div>	
		<div class="clear"></div>	
		<div class="form-item">
			<div>
				<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/continueshop.png" PostBackUrl="~/Default.aspx" />
			</div>
			<div>
				<asp:ImageButton ID="imgbtnUpdateQtty" runat="server" ImageUrl="~/images/cart_update.gif" OnClick="imgbtnUpdateQtty_Click" ValidationGroup="GridVShoppingCart" Visible="False" />
			</div>
			<div>
				<asp:ImageButton ID="imgbtnOrder" runat="server" ImageUrl="~/images/cart_checkout.gif" PostBackUrl="~/Apps/Payment.aspx" Visible="False" />
			</div>			
		</div>	
	</div>
</div>